package com.miplus.ccrm.workflow.nodes.impl;

import com.miplus.ccrm.workflow.model.enums.NodeType;
import com.miplus.ccrm.workflow.logic.LfEdge;
import com.miplus.ccrm.workflow.logic.LfNode;
import com.miplus.ccrm.workflow.nodes.BaseFlowConverter;
import com.miplus.ccrm.workflow.nodes.BaseV2NodeConverter;
import com.miplus.ccrm.workflow.nodes.IFlowConverter;
import com.miplus.ccrm.workflow.nodes.INodeConverter;

import java.util.List;

public class StartNodeConverterImpl extends BaseV2NodeConverter implements INodeConverter {

    public String converter(Object config, List<Object> lines, List<Object> nodes, List<INodeConverter> nodeConverters, BaseFlowConverter baseFlowConverter) {
        return "";
    }

    @Override
    public String converter(LfNode config, List<LfEdge> lines, List<LfNode> nodes, List<INodeConverter> nodeConverters, IFlowConverter flowConverter) {
        String baseTemplate = super.converter(config, lines, nodes, nodeConverters, flowConverter);
        String[] body = new String[]{
                // 获取config里面设置的变量

        };


        return baseTemplate.replace("${body}",String.join("\n",body) );
    }

    @Override
    public NodeType getNodeType() {
        return NodeType.START;
    }


}
